import request from '@/utils/request'

// 查询订单配件信息列表
export function listOrderPart(query) {
  return request({
    url: '/vanger/orderPart/list',
    method: 'get',
    params: query
  })
}

// 查询订单配件信息列表（联合）
export function listUnion(query) {
  return request({
    url: '/vanger/orderPart/listUnion',
    method: 'get',
    params: query
  })
}


// 查询订单配件信息详细（联合）
export function getInfoUnion(id) {
  return request({
    url: '/vanger/orderPart/getInfoUnion/' + id,
    method: 'get'
  })
}

// 查询订单配件信息详细
export function getOrderPart(id) {
  return request({
    url: '/vanger/orderPart/' + id,
    method: 'get'
  })
}

// 新增订单配件信息
export function addOrderPart(data) {
  return request({
    url: '/vanger/orderPart',
    method: 'post',
    data: data
  })
}

// 修改订单配件信息
export function updateOrderPart(data) {
  return request({
    url: '/vanger/orderPart',
    method: 'put',
    data: data
  })
}

// 删除订单配件信息
export function delOrderPart(id) {
  return request({
    url: '/vanger/orderPart/' + id,
    method: 'delete'
  })
}
